package cn.wzg.server;

import cn.wzg.server.Servers.Serverimpl.BIORPCServer;
import cn.wzg.server.Servers.Serverimpl.NettyServer;
import cn.wzg.server.Service.ServiceProvider;
import cn.wzg.server.Service.Serviceimpl.BlogServiceimpl;
import cn.wzg.server.Service.Serviceimpl.Userserviceimpl;

import java.io.IOException;

public class MainServer1 {
    public static void main(String[] args) throws Exception{
        Userserviceimpl userservice=new Userserviceimpl();
        BlogServiceimpl blogservice=new BlogServiceimpl();
        ServiceProvider serviceProvider=new ServiceProvider("127.0.0.1",8888);
        serviceProvider.provideServiceInterface(userservice);
        serviceProvider.provideServiceInterface(blogservice);
        //BIORPCServer biorpcServer = new BIORPCServer(serviceProvider.getInterfaceProvider());
        //biorpcServer.start(8888);
        NettyServer nettyServer = new NettyServer(serviceProvider);
        nettyServer.start(8888);
    }

}
